﻿<%@ Page Language="C#" masterpagefile="~/Admin/Main.master" title="添加栏目" AutoEventWireup="true" CodeFile="MenuAdd.aspx.cs" Inherits="Admin_MenuAdd" %>

<%@ Register TagPrefix="uc" TagName="ContentMenu" Src="~/Admin/ContentMenu.ascx"%>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftMenu" Runat="Server">
    <uc:ContentMenu ID="ContentMenu" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MidContent" Runat="Server">
  <div id="mainMenu">
  	<ul>
		<li><a href="MenuAdd.aspx">添加栏目</a></li>
		<li><a href="MenuList.aspx">栏目列表</a></li>
	</ul>
  </div>
   <div id="main">
   <asp:Label id="Msg" runat="server" Text="" CssClass="msg" Visible="False"></asp:Label>
    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
      <tr>
        <td colspan="2" bgcolor="#FFFFFF" class="mainTitle">添加栏目&nbsp;</td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF" class="mainLeftTd" >
            栏目名称:</td>
        <td bgcolor="#FFFFFF">&nbsp;<asp:TextBox ID="MenuName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="MenuNameValidator1" runat="server" ControlToValidate="MenuName"
                ErrorMessage="栏目名称必须填写"></asp:RequiredFieldValidator></td>
      </tr>
      <tr>
        <td align="right" bgcolor="#FFFFFF" class="mainLeftTd" >
            栏目标识:</td>
        <td bgcolor="#FFFFFF">&nbsp;<asp:TextBox ID="FileName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="FileNameRequiredFieldValidator" runat="server" ControlToValidate="FileName"
                ErrorMessage="栏目标识必须填写" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="FileName"
                Display="Dynamic" ErrorMessage="栏目标识必须为小写字母或下划线组成" ValidationExpression="[a-z_]{0,30}"></asp:RegularExpressionValidator>
            <asp:CustomValidator ID="FileNameCustomValidator" runat="server" ControlToValidate="FileName"
                Display="Dynamic" ErrorMessage="此标识已经存在" OnServerValidate="FileNameCustomValidator_ServerValidate"></asp:CustomValidator></td>
      </tr>
      <tr id="locationTr">
        <td align="right" bgcolor="#FFFFFF"  >
            栏目位置:</td>
        <td bgcolor="#FFFFFF"><asp:RadioButtonList ID="LocationList" runat="server" CssClass="radio" RepeatDirection="Horizontal" RepeatLayout="Flow">
            </asp:RadioButtonList>
            <asp:RequiredFieldValidator ID="LocationValidator" runat="server" ControlToValidate="LocationList"
                Display="Dynamic" ErrorMessage="栏目位置必须选择"></asp:RequiredFieldValidator></td>
      </tr>
      <tr id="attributerTr">
        <td align="right" bgcolor="#FFFFFF" >
            栏目类型:</td>
        <td bgcolor="#FFFFFF"><asp:RadioButtonList ID="AttributerList" runat="server" CssClass="radio"
                RepeatLayout="Flow">
            </asp:RadioButtonList>
            <asp:RequiredFieldValidator ID="AttributerValidator" runat="server" ControlToValidate="AttributerList"
                Display="Dynamic" ErrorMessage="栏目类型必须选择"></asp:RequiredFieldValidator><span class="explain"></span></td>
      </tr>
      <tr id="tr1" class="hide">
        <td align="right" bgcolor="#FFFFFF" >
            链接地址:</td>
        <td bgcolor="#FFFFFF">&nbsp;<asp:TextBox ID="Href" runat="server"></asp:TextBox></td>
      </tr>
      <tr id="tr2">
        <td align="right" bgcolor="#FFFFFF" >
            是否加密:</td>
        <td bgcolor="#FFFFFF">
            <asp:RadioButtonList ID="Encrypt" runat="server" CssClass="radio" RepeatDirection="Horizontal"
                RepeatLayout="Flow">
                <asp:ListItem Value="1">是</asp:ListItem>
                <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
            </asp:RadioButtonList></td>
      </tr>
      <tr id="tr3">
        <td align="right" bgcolor="#FFFFFF" >
            是否显示:</td>
        <td bgcolor="#FFFFFF">
            <asp:RadioButtonList ID="Show" runat="server" CssClass="radio" RepeatDirection="Horizontal"
                RepeatLayout="Flow">
                <asp:ListItem Selected="True" Value="1">是</asp:ListItem>
                <asp:ListItem Value="0">否</asp:ListItem>
            </asp:RadioButtonList></td>
      </tr>
      <tr id="tr4">
        <td align="right" bgcolor="#FFFFFF" >
            打开方式:</td>
        <td bgcolor="#FFFFFF">
            <asp:RadioButtonList ID="TargetList" runat="server" CssClass="radio" RepeatDirection="Horizontal"
                RepeatLayout="Flow">
            </asp:RadioButtonList></td>
      </tr>

      <tr>
        <td align="right" bgcolor="#FFFFFF"></td>
        <td bgcolor="#FFFFFF">&nbsp;<asp:Button ID="Add" runat="server" Text="添加栏目" CssClass="inputBt" OnClick="Add_Click" /></td>
      </tr>
    </table>
  </div>
  <script language="JavaScript" type="text/javascript" >
        topMenuThisPage(2);//当前位置顶部菜单标识
        leftMenuThisPage(1,1);//当前位置左侧菜单标识
        mainMenuThisPage(1);//当前选项卡标识
  </script>
</asp:Content>

